﻿<Window x:Class="BehaviorTest.FadeInAndOutTest"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="FadeInAndOutTest" Height="296" Width="343"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:custom="clr-namespace:CustomBehaviorsLibrary;assembly=CustomBehaviorsLibrary" 
>
    <StackPanel x:Name="LayoutRoot" Margin="10">

        <StackPanel Orientation="Horizontal" Margin="3,15">
            <Button Content="Click to Fade the Label" Padding="5">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Click">
                        <custom:FadeOutAction TargetName="border"  />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Button>
            <Button Content="Click to Show the Label" Padding="5">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Click">
                        <custom:FadeInAction TargetName="border"  />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Button>
        </StackPanel>
        <Border x:Name="border" Background="Orange" BorderBrush="Black" BorderThickness="1" Margin="3,0" >
            <TextBlock Margin="5" FontSize="17" TextWrapping="Wrap"  Text="I'm the target of the FadeOutAction and FadeInAction."></TextBlock>
        </Border>
    </StackPanel>
</Window>
